package com.flute.framework.util.ftp;

import java.io.IOException;
import java.io.InputStream;

public interface IFileOperation {
	String COMMON_SEPARATOR = "/";

	void init() throws Exception;

	void finalise() throws Exception;

	boolean mkdir(String uri) throws Exception;

	boolean mkdirs(String uri) throws Exception;

	boolean createNewFile(String uri) throws Exception;

	boolean createNewFile(String uri, String name) throws Exception;

	boolean delete(String uri) throws Exception;

	boolean delete(String uri, String file) throws Exception;

	boolean removeDirectory(String uri) throws Exception;

	boolean exists(String uri) throws Exception;

	boolean isFile(String uri) throws Exception;

	boolean isDirectory(String uri) throws Exception;

	String[] list(String uri) throws Exception;

	InputStream load(String uri) throws Exception;

	boolean download(String uri, String filename) throws Exception;

	boolean upload(String filename, String uri) throws Exception;

	boolean save(String uri, InputStream is) throws Exception;

	long getNotLockLastModifiedTime(String folder);

	long lastModified(String uri) throws IOException;

	long size(String uri) throws Exception;

	String getSeparator();

	String combin(String uri, String fileName);

	boolean clearFolder(String path, String name);
}